package com.ethink.system.facade.impl;

import com.ethink.system.api.info.SystemMenuInfo;
import com.ethink.system.api.request.SystemMenuAddRequest;
import com.ethink.system.api.request.SystemMenuQueryRequest;
import com.ethink.system.api.request.SystemMenuUpdateRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ethink.system.service.SystemMenuService;
import com.ethink.system.api.SystemMenuFacade;

import java.util.List;

/**
 * 系统菜单表 Facade接口
 *
 * @author default
 * @date 2022-09-26
 */
@RestController
@Slf4j
@RequestMapping("system-service/facade/v1/systemMenu")
public class SystemMenuFacadeImpl implements SystemMenuFacade {

    @Autowired
    private SystemMenuService systemMenuService;

    @Override
    public List<SystemMenuInfo> getSystemMenuList(SystemMenuQueryRequest request) {
        return systemMenuService.getSystemMenuList(request);
    }

    @Override
    public SystemMenuInfo getSystemMenuById(Long systemMenuId) {
        return systemMenuService.getSystemMenuById(systemMenuId);
    }

    @Override
    public void addSystemMenu(SystemMenuAddRequest request) {
        systemMenuService.addSystemMenu(request);
    }

    @Override
    public void updateSystemMenu(SystemMenuUpdateRequest request) {
        systemMenuService.updateSystemMenu(request);
    }

    @Override
    public void deleteSystemMenu(Long systemMenuId) {
        systemMenuService.deleteSystemMenu(systemMenuId);
    }
}